package com.miyu.system.pojo.system;

import com.miyu.system.utils.jpacomment.annotation.ColumnComment;
import com.miyu.system.utils.jpacomment.annotation.TableComment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.persistence.*;
import lombok.Data;

import java.io.Serializable;

/**
 * 字典通用类（动态表取值）;
 * @author : miyu
 * @date : 2023-7-23
 */
@ApiModel(value = "字典通用类（动态表取值）",description = "")
@Data
@Entity
@Table(name="sys_dict_dyna")
@TableComment("字典通用类（动态表取值）")
public class SysDictDyna implements Serializable {
    /** 主键 */
    @Id
    @TableGenerator(name="id_gen",  table="sys_id_generator", pkColumnName="table_name", pkColumnValue="sys_dict_detail", valueColumnName="id_value", initialValue=1, allocationSize=1)
    @GeneratedValue(strategy=GenerationType.TABLE, generator="id_gen")

    @ApiModelProperty(value="主键",notes = "")
    @ColumnComment("主键")
    @Column(name = "item_id", nullable = false,length=111 )
    private Integer itemId ;
    /** 主表主键 */
    @ApiModelProperty(value="主表主键",notes = "")
    @ColumnComment("主表主键")
    @Column(name = "dict_id", nullable = true,length=11 )
    private Integer dictId ;
    /** 是否树状结构 */
    @ApiModelProperty(value="是否树状结构",notes = "")
    @ColumnComment("是否树状结构")
    @Column(name = "is_tree", nullable = true,length=1 )
    private String isTree ;
    /** 取值范围 */
    @ApiModelProperty(value="取值范围",notes = "")
    @ColumnComment("取值范围")
    @Column(name = "sql_field", nullable = true,length=2000 )
    private String sqlField ;
}